<div class="layui-fluid">
    <div class="layui-card">
        {eq name="admin_data.role_id" value="1"}
        <div class="layui-form layui-card-header layuiadmin-card-header-auto">
            <div class="layui-form-item">
                <form class="layui-form" method="get" action="">
                    <div class="layui-inline">
                        <label class="layui-form-label">选择代理商</label>
                        <div class="layui-input-block">
                            <select name="admin_id">
                                <option value="0">我的人员信息</option>
                                {foreach name="admin_list" item="val" key="key"}
                                <option value="{$val.admin_id}" {eq name="admin_id" value="$val.admin_id"} selected {/eq} >{$val.nickname}（{$val.account}）</option>
                                {/foreach}
                            </select>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <button class="layui-btn layuiadmin-btn-useradmin">
                            <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                        </button>
                    </div>
                </form>
            </div>
        </div>
        {/eq}
        <div class="layui-card-body">
            <div class="left mb10">
                {:u('/Role/insertRole','','添加角色','load','layui-btn-normal', 600, 220)}
            </div>
            <div class="layui-form">
                <table class="layui-table" id="table-list">
                    <thead>
                    <tr>
                        <td>序号</td>
                        <td>角色名称</td>
                        <td>操作</td>
                    </tr>
                    </thead>
                    <tbody>
                    {foreach name="list" item="val" key="key"}
                    <tr>
                        <td>{$key+1}</td>
                        <td>{$val.role_name}</td>
                        <td>
                            {in name="val.role_id" value="1,2,3"}
                            {eq name="val.role_id" value="1"}
                            ===不可操作===
                            {else/}
                            {eq name="admin_data.role_id" value="1"}
                            {:u('/Role/updateRole',['role_id'=>$val['role_id']],'编辑','load','layui-btn-normal layui-btn-sm',600,220)}
                            {:u('/Role/auth',['role_id'=>$val['role_id']],'角色授权','','layui-btn-normal layui-btn-sm')}
                            {:u('/Role/deleteRole',['role_id'=>$val['role_id']],'删除','act','layui-btn-danger layui-btn-sm')}
                            {else/}
                            ===不可操作===
                            {/eq}
                            {/eq}
                            {else/}
                            {:u('/Role/updateRole',['role_id'=>$val['role_id']],'编辑','load','layui-btn-normal layui-btn-sm',600,220)}
                            {:u('/Role/auth',['role_id'=>$val['role_id']],'角色授权','','layui-btn-normal layui-btn-sm')}
                            {:u('/Role/deleteRole',['role_id'=>$val['role_id']],'删除','act','layui-btn-danger layui-btn-sm')}
                            {/in}
                        </td>
                    </tr>
                    {/foreach}
                    </tbody>
                </table>
                <div class="paging">{$page|raw}</div>
            </div>
        </div>
    </div>
</div>